function [F_best,max_new,alpha] = AO(p,c1,c2,L,NUM,K,T2,Hbar2,tau,rho,M,H1,e,NAME,alpha_low,alpha_up)
%UNTITLED 此处显示有关此函数的摘要
%   此处显示详细说明
max=-100;
F_best=diag(exp(rand(L,1)*(2*pi)*1i));
F_old=F_best;
alpha=1/rho;   
if(strcmp("PSO",NAME))
    [ F_best,max_new ] = PSO_AO( p,c1,c2,L,NUM,K,T2,Hbar2,tau,rho,alpha,M,H1,e);
end

if(strcmp("random",NAME))
    max_new=Sumrate_Detequi(K,L,M,T2,Hbar2,tau,rho,alpha,H1,F_best);
    return;
end

if(strcmp("fix",NAME))
    alpha = fminbnd(@(alpha) -Sumrate_Detequi(K,L,M,T2,Hbar2,tau,rho,alpha,H1,eye(L)),alpha_low,alpha_up);
    max_new=Sumrate_Detequi(K,L,M,T2,Hbar2,tau,rho,alpha,H1,eye(L));
    return;
end
end

